package ioc16;

import java.beans.PropertyEditorSupport;

/**
 * Auther:ws@itany.com
 * Date:20-9-14 下午1:51
 * Version:1.0
 * Description:
 */

public class AddressEditor extends PropertyEditorSupport {
    @Override
    public void setAsText(String text) throws IllegalArgumentException {
        String[] arr = text.split("-");
        Address address = new Address();
        address.setProvince(arr[0]);
        address.setCity(arr[1]);
        setValue(address);


    }

}
